home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Freeware / Adobe AIR 1.5.1 / AdobeAIRInstaller.exe / setup.swf / scripts / mx / resources / ResourceManager.as < prev    next >
Encoding:
Text File  |  2009-02-12  |  885 b   |  39 lines

  1. package mx.resources
  2. {
  3.    import mx.core.Singleton;
  4.    import mx.core.mx_internal;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class ResourceManager
  9.    {
  10.       private static var implClassDependency:ResourceManagerImpl;
  11.       
  12.       private static var instance:IResourceManager;
  13.       
  14.       mx_internal static const VERSION:String = "3.0.0.0";
  15.       
  16.       public function ResourceManager()
  17.       {
  18.          super();
  19.       }
  20.       
  21.       public static function getInstance() : IResourceManager
  22.       {
  23.          if(!instance)
  24.          {
  25.             try
  26.             {
  27.                instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
  28.             }
  29.             catch(e:Error)
  30.             {
  31.                instance = new ResourceManagerImpl();
  32.             }
  33.          }
  34.          return instance;
  35.       }
  36.    }
  37. }
  38.  
  39.